package DataBaseManager;
import java.io.Serializable;
import java.util.ArrayList;

import DataType.MyDataType;
public class Data implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	ArrayList<Row> rows;
	public Data()
	{
		rows = new ArrayList<Row>();
	}
	
	public void insert(Row row)
	{
		rows.add(row);
	}
	public void delete(int index)
	{
		rows.remove(index);
	}
	
	public int getRowCount(){
		return rows.size();
	}
	
	public void setValue(int row, int col, MyDataType value){
		rows.get(row).setValue(col, value);
	}
	
	public 	ArrayList<Row> getRows(){
		return this.rows;
	}
	
	public String[] getValueOfRow(int input){
		return this.rows.get(input).getArrayStringValue();
	}
	
	public void DeleteRow(int input){
		this.rows.remove(input);
	}
}
